<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglibs.jsp" %>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="always" name="referrer">
    <title>设备管理</title>

    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    <script src="${ctxstatic}/js/faultManage/device_Manage.js" type="text/javascript"></script>
    <style>
        #form_line input{
            width: 150px;
        }
        #form_line select{
            width: 150px;
        }
        #form_device_name{
            width: 150px;
        }
        #form_device_num{
            width: 150px;
        }
    </style>
    <script>
        var username= "${user.username}";
    </script>
</head>

<body>
<div class="easyui-layout" data-options="fit:true,border:false,minWidth:560">
    <div data-options="region:'west',border:true" style="height:100%;width: 45%;">
        <div data-options="region:'north',border:true" style="padding: 10px 5px;">
            <input id="line_name" class="easyui-textbox" data-options="label:'线别名称'" style="width:250px;"/>
            <a href="javascript:void(0)" onclick="queryLine()" class="easyui-linkbutton button-blue"
               style="width: 70px;margin-left: 10px;">查&nbsp;询</a>
        </div>
        <div data-options="region:'south',border:false" style="height:90%;width: 100%;">
            <div id="tb_Line" style="padding:2px 5px;">
                <a id="btn-dept-add" href="javascript:void(0)" onclick="add()" class="easyui-linkbutton"
                   iconCls="icon-add"
                   plain="true">添加</a>
                <a id="btn-dept-edit" href="javascript:void(0)" onclick="edit()" class="easyui-linkbutton"
                   iconCls="icon-edit"
                   plain="true">编辑</a>
                <a id="btn-dept-delete" href="javascript:void(0)" onclick="remove()" class="easyui-linkbutton"
                   iconCls="icon-remove"
                   plain="true">删除</a>
            </div>
            <table id="mdg_line" style="width:100%;height:100%;">
            </table>
        </div>
    </div>
    <div data-options="region:'center',border:true" style="height:100%">
        <div data-options="region:'north',border:false" style="padding: 10px 5px;">
            <input id="device_name" class="easyui-textbox" data-options="label:'设备名称'" style="width:250px;"/>
            <input id="lineid" style="display: none">
            <a href="javascript:void(0)" onclick="queryDevice()" class="easyui-linkbutton button-blue"
               style="width: 70px;margin-left: 10px;">查&nbsp;询</a>
            <label id="show_line_lable" style="color: red;margin: 5px;">暂未选择线体</label>
        </div>
        <div data-options="region:'south',border:false" style="height:90%;width: 100%;">
            <div id="tb_Device" style="padding:2px 5px;">
                <a href="javascript:void(0)" onclick="add_device()" class="easyui-linkbutton" iconCls="icon-add"
                   plain="true">添加</a>
                <a id="btn-device-edit" href="javascript:void(0)" onclick="edit_device()" class="easyui-linkbutton"
                   iconCls="icon-edit"
                   plain="true">编辑</a>
                <a id="btn-device-delete" href="javascript:void(0)" onclick="remove_device()" class="easyui-linkbutton"
                   iconCls="icon-remove"
                   plain="true">删除</a>
            </div>
            <table id="mdg_device" style="width:100%;height:100%;">
            </table>
        </div>
    </div>
</div>

<div id="dlg_line">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id="form_line">
                <table style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">所属车间:</td>
                        <td>
                            <select id="workshop" name="workshop" class="easyui-combobox" data-options="required:true">
                                <option value="一期4楼插件车间">一期4楼插件车间</option>
                                <option value="一期4楼网关车间">一期4楼网关车间</option>
                                <option value="一期2楼整机组测包车间">一期2楼整机组测包车间</option>
                                <option value="NB模组车间(NB-lot)">NB模组车间(NB-lot)</option>
                            </select>
                        </td>
                        <td align="right">线体名称:</td>
                        <td>
                            <input id="form_line_name" name="line_name" class="easyui-textbox"
                                   data-options="required:true"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">备注:</td>
                        <td colspan="3">
                            <input id="remark" name="remark" data-options="multiline:true" style="width:100%;height: 100px;" class="easyui-textbox"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>

<div id="dlg_device">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id="form_device">
                <table style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">设备名称:</td>
                        <td>
                            <input id="form_device_name" name="device_name" class="easyui-textbox"
                                   data-options="required:true"/>
                        </td>
                        <td align="right">设备编号:</td>
                        <td>
                            <input id="form_device_num" name="device_num" class="easyui-textbox"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">备注:</td>
                        <td colspan="3">
                            <input id="remark2" name="remark" data-options="multiline:true" style="width:100%;height: 100px;" class="easyui-textbox"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="dlg_device_move">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id="form_device_move">
                <table style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">更换至线体:</td>
                        <td>
                            <select id="moveform_line_id" name="line_id" style="width: 150px" class="easyui-combobox" data-options="required:true"></select>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>

</body>
</html>